﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Bentley.GenerativeComponents.Features
{    

    public partial class DebugForm : Form
    {
        public delegate void SetTextCallback(string text);

        public DebugForm()
        {
            InitializeComponent();
        }

        public void AppendText(string line)
        {
            if (this.txtDebug.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(AppendText);
                this.Invoke(d, new object[] { line });
            }
            else
            {
                txtDebug.AppendText(line + Environment.NewLine);
            }
        }
    }
}
